package com.carrie.mdg.myviewtext.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.carrie.mdg.myviewtext.R;

import androidLib.activity.BaseActivity;

public class TestForResultActivity extends BaseActivity {
    private Button btn_back_result;

    @Override
    protected void initVariables() {

    }

    @Override
    protected void initViews(Bundle savedInstanceState) {
        setContentView(R.layout.activity_test_for_result);
        btn_back_result = (Button) findViewById(R.id.button5);
    }

    @Override
    protected void initEvent() {
        btn_back_result.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.putExtra("back_data", "Hello TextActivity");
                setResult(RESULT_OK, intent);
            }
        });
    }

    @Override
    protected void loadData() {

    }

    @Override
    public void onBackPressed() {
        super.onBackPressed();
    }
}
